<?php
$form = $this->beginWidget('CActiveForm', array(
    'id'                     => 'users-form',
    'enableAjaxValidation'   => true,
    'enableClientValidation' => true,
    'focus'                  => array($model, 'title'),
    'errorMessageCssClass' => 'error',
    'htmlOptions'          => array(
        'class'   => 'form',
    ),
));
?>

<fieldset>
    <ul>
        <li>
            <?php
                $attrName = 'login_id';
                echo $form->labelEx($model, $attrName, array(
                    'class' => 'desc'
                ));
            ?>
            <div><?php
                echo $form->textField($model, $attrName, array(
                    'class' => 'text medium'));

                echo $form->checkbox($model, 'activated_flag');
                echo CHtml::label($model->getAttributeLabel('activated_flag'), 
                    'DUsers_activated_flag', array(
                        'style' => 'display:inline-block; font-weight:900;'
                ));
                echo $form->error($model, $attrName);
            ?></div>
        </li>
        
        <li>
            <?php
                $attrName = 'password';
                echo $form->labelEx($model, $attrName, array(
                    'class' => 'desc'
                ));
            ?>
            <div><?php 
                echo $form->passwordField($model, $attrName, array(
                    'class' => 'text medium'));
                echo $form->error($model, $attrName);
            ?></div>
        </li>
        
        <li>
            <?php
                $attrName = 're_password';
                echo $form->labelEx($model, $attrName, array(
                    'class' => 'desc'
                ));
            ?>
            <div><?php 
                echo $form->passwordField($model, $attrName, array(
                    'class' => 'text medium'));
                echo $form->error($model, $attrName);
            ?></div>
        </li>
        
        <li>
            <?php
                $attrName = 'full_name';
                echo $form->labelEx($model, $attrName, array(
                    'class' => 'desc'
                ));
            ?>
            <div><?php 
                echo $form->textField($model, $attrName, array(
                    'class' => 'text medium'));
                echo $form->error($model, $attrName);
            ?></div>
        </li>
        
        <li>
            <?php
                $attrName = 'email';
                echo $form->labelEx($model, $attrName, array(
                    'class' => 'desc'
                ));
            ?>
            <div><?php 
                echo $form->textField($model, $attrName, array(
                    'class' => 'text medium'));
                echo $form->error($model, $attrName);
            ?></div>
        </li>
        
        <li>
            <?php
                $attrName = 'last_login';
                echo $form->labelEx($model, $attrName, array(
                    'class' => 'desc'
                ));
            ?>
            <div><?php 
                $this->widget('ext.mylib.widgets.Datepicker.DDatePicker', array(
                    'model'       => $model,
                    'attribute'   => $attrName,
                    'htmlOptions' => array(
                        'class' => 'text normal'
                    ),
                ));
                echo $form->error($model, $attrName);
            ?></div>
        </li>
        
        <!-- buttons -->
        <li style="text-align: center;">
            <?php
            $label = Yii::t('DadminModule.app', 'save_u');
            echo CHtml::submitButton($label, array(
                'name'  => 'submit',
                'class' => 'ui-state-default ui-corner-all ui-button'
            ));
            
            $label = Yii::t('DadminModule.app', 'reset_u');
            echo CHtml::button($label, array(
                'id'    => 'btn-reset',
                'class' => 'ui-state-default ui-corner-all ui-button',
                'style' => 'margin:0 10px;',
            ));
            
            $label = Yii::t('DadminModule.app', 'cancel_u');
            echo CHtml::button($label, array(
                'class' => 'ui-state-default ui-corner-all ui-button btn-cancel'
            ));
            ?>
        </li>
        <!-- //buttons -->
    </ul>
</fieldset>

<?php $this->endWidget(); ?>